<template>
	<view class="page">
	    <u-tabs :list="tabbar" :is-scroll="false" :current="current" @change="change"></u-tabs>
	<workList :list="list" v-if="!current"></workList>
			
			<manList :list="list"  v-if="current"></manList>
	</view>
</template>

<script>
	import loader from '@/common/loadPage.js';
	export default {
		mixins: [loader],
		data() {

			return {
				tabbar: [
					{
						name: '招工信息'
					}, {
						name: '找活信息'
					}
				],
				current: 0,
				list: [],
				initial: {
					geturl: "/user/collectList",
					parm: {
					  type:2
					},
					isPage: true
				},




			}
		},
		async onLoad() {
		
			this.getGoods()
		},
		methods: {
		change(index) {
			if(index){
				this.initial.parm.type=1
			}else{
				this.initial.parm.type=2
			}
			this.current = index;
			this.getGoods()
		}
			
		}
	}
</script>


<style>
	.page {
		background: #F1F1F1;
		min-height: 100vh;
	}
	.list{
		background: #fff;
	    width:700rpx;
		 margin: 20rpx auto;
		 padding: 20rpx;
	}
</style>
